
import themeJson from './theme.json';
import { getLocal} from '@/utils';
import { cloneDeep } from 'lodash-es';
import { formatJson } from '@/utils';
/** 获取主题配置 */
export function initTheme() {
  // TODO 这块ts类型暂时any
  const cacheTheme  = formatJson(getLocal<Theme.ThemeConfig>('__USER_THEME__') as unknown as string, 2);
  return cloneDeep(cacheTheme) ?? themeJson as Theme.ThemeConfig;
}
